package com.lx.backstagemanagement.conf;

import org.springframework.boot.web.servlet.FilterRegistrationBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.annotation.Order;
import org.springframework.web.filter.HiddenHttpMethodFilter;
import org.springframework.web.filter.HttpPutFormContentFilter;

/**
 * @author lee
 * @date 2018年6月26日 13:06:04
 */
@Configuration
@Order(Integer.MAX_VALUE)
public class FilterConfig {
    @Bean
    public FilterRegistrationBean filterRegist() {
        FilterRegistrationBean frBean = new FilterRegistrationBean();
        frBean.setFilter(new HttpPutFormContentFilter());
        frBean.setFilter(new HiddenHttpMethodFilter());
        frBean.addUrlPatterns("/*");
        return frBean;
    }
} 